home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / _TR_TOUP.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  517b  |  29 lines

  1. /********
  2. * _TR_TOUP.C
  3. *
  4. * by Leonard Zerman
  5. * modified by Tom Rettig
  6. *
  7. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  8. *
  9. * Syntax: _tr_toup(c)
  10. * Return: The uppercase of whatever string is passed.
  11. * Note  : Valid with ASCII character set only.
  12. ********/
  13.  
  14. #include "trlib.h"
  15.  
  16. char *_tr_toup(c)
  17. char *c;
  18. {
  19.    char *d = c;
  20.    while (*c)                   
  21.    {
  22.       if ( *c >= 'a' && *c <= 'z' )
  23.          *c = (*c - UPPER);  
  24.       c++;  
  25.    }
  26.    return(d);
  27. }
  28. /* eof */
  29.